import 'package:flutter/material.dart';
import 'package:flutter_redis/routes/routes.dart';
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
import 'controller/theme_controller.dart';

void main() async {
  await GetStorage.init();
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  final ThemeController themeController = Get.put(ThemeController());

  MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return Obx(
      () => GetMaterialApp(
        title: 'Redis',
        theme: themeController.theme,
        debugShowCheckedModeBanner: false,
        initialRoute: AppRoutes.home,
        getPages: appPages,
      ),
    );
  }
}
